<html>
<head><meta charset="utf-8"><title>How to check for implicit derefs in MIR · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20to.20check.20for.20implicit.20derefs.20in.20MIR.html">How to check for implicit derefs in MIR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225115634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20to%20check%20for%20implicit%20derefs%20in%20MIR/near/225115634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20to.20check.20for.20implicit.20derefs.20in.20MIR.html#225115634">(Feb 04 2021 at 03:42)</a>:</h4>
<p>I believe implicit derefs are done when lowering the HIR to THIR, which is then lowered to THIR, as an <code>Adjustment</code> in the impl of <code>Mirror</code> for <code>hir::Expr</code>. Now I'm doing something at the MIR level, and I want to know if the implicit deref was applied.</p>



<a name="225124005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20to%20check%20for%20implicit%20derefs%20in%20MIR/near/225124005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20to.20check.20for.20implicit.20derefs.20in.20MIR.html#225124005">(Feb 04 2021 at 06:35)</a>:</h4>
<p>At MIR level implicit derefs are made explicit. The fact that it was implicit is lost.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>